﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Fsb.Utility;

namespace VideoCache.Server.MVCWeb.Controllers
{
    public class VerifyCodeController : Controller
    {
        //
        // GET: /Verify/

        public ActionResult Index()
        {
            ValidateCode code = ValidateCode.NewCode();

            Session[Constans.VerifyCode] = code.ToString();

            return File(code.ToImageBytes(), @"image/jpeg");
        }

    }
}
